%tr{ :bgcolor => color_row(theme), :style => 'border-bottom: 2px solid #AAA; border-top: 2px solid #AAA;' }
  %td.theme{:colspan => columns, :style => 'border-right: 1px solid #AAA;' }
    - if theme.base.blank?
      &nbsp;
    - else
      %b= color_text(theme, :name, theme.base.name)
      = color_text(theme, :code, "(Code: #{theme.base.code})")
  %td.theme{:colspan => columns }
    - if theme.target.blank?
      &nbsp;
    - else
      %b= color_text(theme, :name, theme.target.name)
      = color_text(theme, :code, "(Code: #{theme.target.code})")
- theme.stories.each do |story|
  = render :partial => 'story', :locals => { :columns => columns, :story => story, :position => 'left', :use_50_90 => use_50_90, :show_costs => show_costs, :show_days => show_days }
%tr{ :bgcolor => '#EEEEEE' }
  %td{ :colspan => columns, :align => 'right', :style => 'border-right: 1px solid #AAA; text-align: right' }
    - if theme.base.blank?
      &nbsp;
    - else
      %b
        = "#{theme.base.name} totals: "
        = color_number(theme, :points, :base, "#{format('%0.1f', theme.base.points)} points")
        - if show_costs
          ="/"
          = color_number(theme, :cost_formatted, :base, "#{theme.base.cost_formatted}")
        - if show_days
          ="/"
          = color_number(theme, :days_formatted, :base, "#{theme.base.days_formatted} days")
  %td{ :colspan => columns, :align => 'right', :style => 'text-align: right' }
    - if theme.target.blank?
      &nbsp;
    - else
      %b
        = "#{theme.target.name} totals: "
        = color_number(theme, :points, :target, "#{format('%0.1f', theme.target.points)} points")
        - if show_costs
          ="/"
          = color_number(theme, :cost_formatted, :target, "#{theme.target.cost_formatted}")
        - if show_days
          ="/"
          = color_number(theme, :days_formatted, :target, "#{theme.target.days_formatted} days")
